<table id="write_widget" class="widget bar_content" >
<tbody><tr>
<td>
  <div id="textile_instructions" class="widget_instructions" style="font-size:small;dis-play:none;">
    <h2>What is Textile?</h2>
    <p>Textile is a simple markup language.</p>
    <pre>textile format &rarr; formatted text</pre>
    _a phrase_ &rarr; <span style="font-style:italic;">a phrase</span> (italic)<br/>
    *a phrase* &rarr; <span style="font-weight:bold;">a phrase</span> (bold)<br/>
    _*a phrase*_ &rarr; <span style="font-weight:bold;font-style:italic;">a phrase</span> (italic+bold)<br/>
    "Google":http://google.com &rarr; <a href="http://google.com" style="text-decoration:underline;color:blue;padding:0;margin:0;">Google</a> (links)<br/>
    h1. A Title &rarr; <h1 style="display:inline;">A Title</h1> &nbsp;(headers)<br/>
        
    <p>For more on Textile's language, hop over to <a href="http://hobix.com/textile/" target="_blank">&laquo;A Textile Reference&raquo;</a>.</p>
  </div>
</td>
<td>
  <div id="write_area">
    <%= form_remote_tag :url=>{:controller=>"contents", :action=>"create_page_element", :id=>@page.id}, :html=>{:id=>"write_content_form"}%>
      <h1>Write here... </h1>
      <small>Write using <b>textile</b> format (see quick reference on the left)</small>
      <br/><%= text_area :content, :body, :style => "height:20em;width:35em;" %>
      <%= hidden_field :content, :content_type, :value=>"text/textile"%>
      <br/><%#= submit_to_remote "Save", "" %>
    <%= end_form_tag %>
    <h2><%= link_to_remote "Save!", :url=>{:controller=>"contents", :action=>"create_page_element", :id=>@page.id }, :submit=>"write_content_form" %></h2>
		<!-- <br/>You can use <em>textile</em> here. <small><%= link_to_function "(what is textile?)", visual_effect( :toggle_slide, "textile_instructions" )%></small> -->
  	
  </div>
</td>
<td>
  <div id="content_metadatas" style="display:none;">
    <% remote_form_for :meta_data, :url=>{:controller=>"contents", :action=>"add_metadata"} do |f| %>
      <h1>Add Meta-datas</h1>
      Key: <%= f.text_field :key, :disabled=>true %><br/>
      Value: <%= f.text_field :value, :disabled=>true %>
      <%= f.hidden_field :content_id, :value=>@content%>
    <% end %>
  </div>
</td>
  <div class="clear"/>&nbsp;</div>
</tr>
</tbody></table>


